import request from '@/utils/request'

// 查询采购组织列表
export function listOrganizations(query) {
  return request({
    url: '/system/organizations/list',
    method: 'get',
    params: query
  })
}

// 查询采购组织详细
export function getOrganizations(poId) {
  return request({
    url: '/system/organizations/' + poId,
    method: 'get'
  })
}

// 新增采购组织
export function addOrganizations(data) {
  return request({
    url: '/system/organizations',
    method: 'post',
    data: data
  })
}

// 修改采购组织
export function updateOrganizations(data) {
  return request({
    url: '/system/organizations',
    method: 'put',
    data: data
  })
}

// 删除采购组织
export function delOrganizations(poId) {
  return request({
    url: '/system/organizations/' + poId,
    method: 'delete'
  })
}
